#ifndef GAME_ENGINE__GRAPHICS_H
#define GAME_ENGINE__GRAPHICS_H

#include "../math/Point2D.h"
#include "../utils/data_types.h"
#include "../utils/useful_macros.h"

#include <SDL/SDL.h>
#include <SDL/SDL_image.h>

class Graphics
{
    public:
        
        static void Init(SDL_PixelFormat* format);
        
        static SDL_Surface* NewSurface(const Point2D& size, Uint32 flags = 0);
        
        static SDL_Surface* LoadImage(const char* filename);
        
        static Uint32 GetColor(uint8 red, uint8 green, uint8 blue);
        
        static Uint32 GetColor(uint8 red, uint8 green, uint8 blue, uint8 alpha);
        
        static void DrawPixel(SDL_Surface* surface, const Point2D& position, Uint32 color);
        
        static void DrawLine(SDL_Surface* surface, const Point2D& src, const Point2D& dst, Uint32 color);
        
    private:
        
        static SDL_PixelFormat* _pixel_format;
};

#endif
